Skip to content

feat: widen requires-python to include Python 3.15 - #19942

Draft
vlad-scherbich wants to merge 17 commits into
vlad/py315-current-py-versionfrom
vlad/py315-requires-python-3.15
Draft

feat: widen requires-python to include Python 3.15#19942
vlad-scherbich wants to merge 17 commits into
vlad/py315-current-py-versionfrom
vlad/py315-requires-python-3.15

Conversation

@vlad-scherbich

@vlad-scherbich vlad-scherbich commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

Widens requires-python >=3.9,<3.15 to >=3.9,<3.16 and adds Trove classifier Programming Language :: Python :: 3.15. Same next-version pip guard as 3.14.

Metadata and pip upper bound only. This is not customer support. wrap() is live on 3.15 via #19928 (fail-close at 3.16). cp315 wheels are still pruned.

Layer Meaning Which PR
Compiled into artifact packaging metadata this PR
Armed at runtime pip accepts 3.15 this PR
Observable in product/Python classifier this PR

Contributes to #17809

Testing

Inspected pyproject.toml. No runtime tests: publish paths are unchanged.

Risks

pip will accept Python 3.15 while cp315 wheels remain pruned.

Additional Notes

Merge blockers on this stack:

No support or SSI enablement reno: pip bound is not support; SSI gate is #19843.

changelog/no-changelog.

Keep the exclusive upper bound one version ahead of the declared
classifier so pip still rejects the next CPython, matching the 3.14
pattern. Restore the SSI enablement note now that packaging declares
3.15.
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against vlad/py315-current-py-version using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

.gitlab/scripts/prune-unsupported-wheels.sh                             @DataDog/python-guild @DataDog/apm-core-python
.gitlab/templates/cached-testrunner.yml                                 @DataDog/python-guild @DataDog/apm-core-python
ddtrace/internal/bytecode_injection/__init__.py                         @DataDog/apm-core-python
ddtrace/internal/compat.py                                              @DataDog/python-guild @DataDog/apm-core-python
ddtrace/internal/coverage/instrumentation_py3_12.py                     @DataDog/ci-app-libraries
ddtrace/internal/module.py                                              @DataDog/debugger-python @DataDog/apm-core-python
ddtrace/internal/monitoring.py                                          @DataDog/apm-core-python
ddtrace/internal/wrapping/__init__.py                                   @DataDog/apm-core-python
ddtrace/internal/wrapping/asyncs.py                                     @DataDog/apm-core-python
ddtrace/internal/wrapping/context.py                                    @DataDog/apm-core-python
ddtrace/internal/wrapping/generators.py                                 @DataDog/apm-core-python
hooks/pre-commit/05-run-bandit                                          @DataDog/python-guild
hooks/scripts/run-mypy.sh                                               @DataDog/python-guild
lib-injection/sources/sitecustomize.py                                  @DataDog/apm-core-python
pyproject.toml                                                          @DataDog/python-guild
riotfile.py                                                             @DataDog/apm-python
tests/internal/test_py315_import_degrade.py                             @DataDog/apm-core-python

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 28, 2026

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 3 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 28, 2026

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 240 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 240 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=135)
ddtrace.profiling.scheduler -×-> ddtrace.trace  (product:profiling -> product:tracing, score=133)
ddtrace.internal.ci_visibility.filters -×-> ddtrace.trace  (product:ci_visibility -> product:tracing, score=133)
ddtrace.appsec._contrib.flask -×-> ddtrace.trace  (product:appsec -> product:tracing, score=133)
ddtrace.internal.opentelemetry.trace -×-> ddtrace.trace  (product:opentelemetry -> product:tracing, score=133)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Aug 28, 2026

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 7 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | check_requirements_lockfiles — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-py | prechecks — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-py | rust ci — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

View all 7 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5be226c | Docs | View more details | Give us feedback!

@pr-commenter

pr-commenter Bot commented Aug 28, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-30 03:19:06

Comparing candidate commit 5be226c in PR branch vlad/py315-requires-python-3.15 with baseline commit 3347d45 in branch vlad/py315-current-py-version.

📊 Benchmarking dashboard

Found 0 performance improvements and 7 performance regressions! Performance is the same for 579 metrics, 10 unstable metrics, 1 known flaky benchmarks, 17 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+2.499µs; +2.675µs] or [+14.879%; +15.924%]

scenario:iastaspects-add_aspect

  • 🟥 execution_time [+10.838µs; +12.481µs] or [+10.799%; +12.436%]

scenario:iastaspects-upper_aspect

  • 🟥 execution_time [+61.560µs; +69.836µs] or [+26.081%; +29.588%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+132.408µs; +138.046µs] or [+33.386%; +34.808%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+35.038µs; +42.299µs] or [+24.232%; +29.255%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+607.342ns; +649.888ns] or [+22.162%; +23.714%]

scenario:tracer-small

  • 🟥 execution_time [+35.688µs; +37.746µs] or [+11.213%; +11.859%]

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-661.911ns; +809.818ns] or [-6.064%; +7.419%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-27.227ns; +39.021ns] or [-4.475%; +6.414%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1734.074ns; +1551.294ns] or [-10.151%; +9.081%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1482.493ns; +1074.400ns] or [-11.113%; +8.054%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-332.234ns; +320.559ns] or [-8.991%; +8.675%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-254.393ns; +259.162ns] or [-8.667%; +8.830%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-59.909ns; +85.130ns] or [-5.131%; +7.290%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-3869.697ns; +4071.248ns] or [-9.501%; +9.996%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-867.933ns; +717.585ns] or [-10.628%; +8.787%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-59096.237ns; +58762.336ns] or [-9.486%; +9.433%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:span-start

  • 🟥 execution_time [+1.543ms; +1.800ms] or [+11.375%; +13.264%]

Known flaky benchmarks without significant changes:

  • scenario:errortrackingflasksqli-baseline
  • scenario:flasksimple-iast-get
  • scenario:iastaspects-casefold_aspect
  • scenario:iastaspects-casefold_noaspect
  • scenario:iastaspects-index_aspect
  • scenario:iastaspects-ljust_noaspect
  • scenario:iastaspects-lower_aspect
  • scenario:iastaspects-replace_aspect
  • scenario:iastaspects-swapcase_aspect
  • scenario:iastaspects-title_noaspect
  • scenario:iastaspects-translate_aspect
  • scenario:iastaspects-translate_noaspect
  • scenario:iastaspects-upper_noaspect
  • scenario:packagespackageforrootmodulemapping-cache_off
  • scenario:packagespackageforrootmodulemapping-cache_on
  • scenario:sethttpmeta-all-enabled
  • scenario:telemetryaddmetric-record-100-metrics

MAX is a support bound; a later bump must not retie CPython API floors.

(cherry picked from commit e988dc5)
Compare to MAX/NEXT_MAX_INFO at call sites so __all__ is not a second pile of version names.

(cherry picked from commit dc6ffe5)
mypy only narrows sys.version_info against literals, so named aliases left
sys.monitoring reachable under python_version 3.10.

(cherry picked from commit 33af304)
#19861 only makes cp315 optional in the package validator. Un-prune after
IMAGE_TAG can build a correct wheel, and only once 3.15 is supported.

(cherry picked from commit 703428b)
(cherry picked from commit 1002958)
Monitoring inject_hook already works. The wrap raise tests are skipif
below NEXT and would demand a raise after wrap lift; they do not pin
this PR error-string change.

(cherry picked from commit 08c8693)
(cherry picked from commit 1958eb4)
The SSI max bump does not need a bandit/mypy skip of lib-injection/.

(cherry picked from commit 0cf5c73)
(cherry picked from commit 7a4bde7)
(cherry picked from commit cbe119a)
(cherry picked from commit 9eb6cf4)
Lint extra bytecode==0.18.1 on 3.15 is not the runtime dep
bytecode>=0.19.0. Leave both; they are different extras.

(cherry picked from commit 5bd7d37)
(cherry picked from commit d301bd4)
Drop it once the testrunner 3.15 interpreter is 3.15.0rc1+, when Cython 3.3 cp315 wheels no longer SIGSEGV.

(cherry picked from commit fbea5a1)
(cherry picked from commit e5dfa0b)
#17849 wrapping is merging to main; hashes sharing jobs and pip
install -e . (#19904) are the remaining reasons MAX stays 3.14.

(cherry picked from commit 117a724)
(cherry picked from commit 6b123dc)
httplib, dbapi, subprocess, and detect_global_locks wrap and share
GitLab --exitfirst jobs. wrap() still raises on 3.15 on this stack.

(cherry picked from commit 79d6534)
(cherry picked from commit 210381e)
NEXT_MAX_PY is 3.15 (packaging). wrap() and lazy must match merged
#19910: trampoline and WrappingContext are live on 3.15, fail closed
from 3.16. A rebase onto main must not re-disable wrap on 3.15.

(cherry picked from commit ed3bd06)
Pip upper bound is not customer support. SSI enablement is the
#19843 gate, not this packaging change.
Lint extra bytecode==0.18.1 conflicts with runtime bytecode>=0.19.0
when uv resolves extras for requires-python that includes 3.15.

(cherry picked from commit cac61ca)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant